import request from '@/utils/request';

const patent = {
  list (params) {
    return request.get('/cgzh/patent/list', { params });
  },
  add (data) {
    return request.post('/cgzh/patent/add', data);
  },
  update (data) {
    return request.post('/cgzh/patent/update', data);
  },
  get (id) {
    return request.get(`/cgzh/patent/detail/${id}`);
  },
  delete (id) {
    return request.post(`/cgzh/patent/delete/${id}`);
  },
  myList (params) {
    return request.get('/cgzh/patent/myList', { params });
  },
  getAll (id) {
    return request.get(`/cgzh/patent/allDetail/${id}`);
  },
  memberAddList (data) {
    return request.post(`/cgzh/patentMember/addList`, data);
  },
  memberListGet (id) {
    return request.get(`/cgzh/patentMember/getByPatentId/${id}`);
  },
  companyListGet (id) {
    return request.get(`/cgzh/patentRight/getByPatentId/${id}`);
  },
  companyAddList (data) {
    return request.post(`/cgzh/patentRight/addList`, data);
  },
  projectAddList (data) {
    return request.post(`/cgzh/patentProject/addList`, data);
  },
  projectListGet (id) {
    return request.get(`/cgzh/patentProject/getByPatentId/${id}`);
  },
  benefitListGet (id) {
    return request.get(`/cgzh/patentBenefit/getByPatentId/${id}`);
  },
  benefitAddList (data) {
    return request.post(`/cgzh/patentBenefit/addList`, data);
  },
  submit (data) {
    return request.post(`/cgzh/patent/submit`, data);
  },
  getJoinList (params) {
    return request.get('/cgzh/patent/getJoinList', { params });
  },
  getMemberList (id) {
    return request.get(`/cgzh/patentMember/getByPatentIdAndType/${id}/1`);
  },
  getMemberListWithType2 (id) {
    return request.get(`/cgzh/patentMember/getByPatentIdAndType/${id}/2`);
  },

  addPatentList (data) {
    return request.post(`/cgzh/patent/addPatentList`, data);
  },
}

export default patent;
